#tag Class
Protected Class CopyFileThread
Inherits Thread
	#tag Event
		Sub Run()
		  cLock = new Semaphore
		  mLock.Signal
		  me.running = 1
		  fromFolderItem.CopyFileTo toFolderItem
		  me.lastErrorCode = fromFolderItem.LastErrorCode
		  me.running = 0
		  mLock.Release
		End Sub
	#tag EndEvent


	#tag Property, Flags = &h0
		cLock As Semaphore = 0
	#tag EndProperty

	#tag Property, Flags = &h0
		fromFolderItem As FolderItem
	#tag EndProperty

	#tag Property, Flags = &h0
		lastErrorCode As Integer = 0
	#tag EndProperty

	#tag Property, Flags = &h0
		running As Integer = 0
	#tag EndProperty

	#tag Property, Flags = &h0
		toFolderItem As FolderItem = 0
	#tag EndProperty


	#tag ViewBehavior
		#tag ViewProperty
			Name="Name"
			Visible=true
			Group="ID"
			InheritedFrom="Thread"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Index"
			Visible=true
			Group="ID"
			Type="Integer"
			InheritedFrom="Thread"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Super"
			Visible=true
			Group="ID"
			InheritedFrom="Thread"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Left"
			Visible=true
			Group="Position"
			Type="Integer"
			InheritedFrom="Thread"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Top"
			Visible=true
			Group="Position"
			Type="Integer"
			InheritedFrom="Thread"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Priority"
			Visible=true
			Group="Behavior"
			InitialValue="5"
			Type="Integer"
			InheritedFrom="Thread"
		#tag EndViewProperty
		#tag ViewProperty
			Name="StackSize"
			Visible=true
			Group="Behavior"
			InitialValue="0"
			Type="Integer"
			InheritedFrom="Thread"
		#tag EndViewProperty
	#tag EndViewBehavior
End Class
#tag EndClass
